﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AdvancedSearch.aspx.cs" Inherits="AlbonWeb.Manager.StyleManager.AdvancedSearch" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Advanced Search</title>
    <script src="/js/ADS.js" type="text/javascript"></script>
    <script src="/js/content.js" type="text/javascript"></script>
    <link href="/css/Content.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        html, body, form
        {
            height: 100%;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server" defaultbutton="btnSearch">
    <div class="rod_left">
    </div>
    <div class="rod_right">
    </div>
    <div class="main_contented">
        <div class="right_top">
            <span class="scon_word">Manager>>Style Search</span>
        </div>
        <table width="750" border="0" class="table_add" cellpadding="0" cellspacing="0">
            <tr>
                <td colspan="2" class="content_title">
                    Advanced Search
                </td>
            </tr>
            <tr class="data_lightcolor">
                <td>
                    &nbsp;
                </td>
                <td>
                </td>
            </tr>
            <tr class="data_darkcolor">
                <td class="td_left">
                    Style Name:
                </td>
                <td class="td_right">
                    <asp:TextBox ID="styleName" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr class="data_lightcolor">
                <td class="td_left">
                    Charge:
                </td>
                <td class="td_right">
                    <asp:RadioButtonList ID="rbtnCharge" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Selected="True" Value="0">ALL</asp:ListItem>
                    <asp:ListItem Value="1">Free</asp:ListItem>
                    <asp:ListItem Value="2">Charge</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr class="data_darkcolor">
                <td class="td_left">
                    Sex:
                </td>
                <td class="td_right">
                    <asp:DropDownList ID="ddlGender" runat="server">
                   
                    </asp:DropDownList>
                </td>
            </tr>
            <tr class="data_lightcolor">
                <td class="td_left">
                    Active:
                </td>
                <td>
                    <asp:CheckBox ID="isActive" runat="server" Text="Acitve" Checked="true" />
                </td>
            </tr>
            <tr class="data_darkcolor">
                <td class="td_left">
                    Select Mode:&nbsp;
                </td>
                <td class="td_right">
                    <asp:RadioButtonList ID="rbtnMode" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Selected="True">ALL</asp:ListItem>
                    <asp:ListItem>Single</asp:ListItem>
                    <asp:ListItem>Multi</asp:ListItem>
                    <asp:ListItem>Text</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr class="data_lightcolor">
                <td class="td_left">
                    Buy Cloth Mark:
                </td>
                <td class="td_right">
                    <asp:RadioButtonList ID="rbtnBuyCloth" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Selected="True">All</asp:ListItem>
                    <asp:ListItem Value="1">Yes</asp:ListItem>
                    <asp:ListItem Value="0">No</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr class="data_darkcolor">
                <td class="td_left">
                    Create Date:
                </td>
                <td class="td_right">
                    <asp:TextBox ID="tbFrom" runat="server"></asp:TextBox>
                    To<asp:TextBox ID="tbTo" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr class="data_lightcolor">
                <td>
                    &nbsp;
                </td>
                <td align="right">
                    <asp:Button ID="btnSearch" runat="server" Text="Search" 
                        onclick="btnSearch_Click" />
                </td>
            </tr>
             <tr class="data_darkcolor">
                <td colspan="2" align="center">
                     <table width="90%" cellpadding="0" cellspacing="0" border="1" bordercolor="#AFDA8C"
                        class="tb_list">
                        <asp:Repeater ID="repMain" runat="server" 
                             onitemdatabound="repMain_ItemDataBound">
                            <HeaderTemplate>
                                <tr class="tr_list_head">
                                    <td>
                                        ID
                                    </td>
                                    <td>
                                        Style Name
                                    </td>
                                    <td>
                                        Parent Style
                                    </td>
                                    <td>
                                        Top Style
                                    </td>
                                    <td>
                                        Sex
                                    </td>
                                    <td>
                                        Active
                                    </td>
                                    <td>
                                        Delete
                                    </td>
                                    <td>
                                        Create Date
                                    </td>
                                </tr>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <tr class="tr_list_content">
                                    <td>
                                        <%#Eval("ID")%>
                                    </td>
                                    <td align="left">
                                        <span class="lbInfo"><%#Eval("styleName")%></span>
                                    </td>
                                    <td>
                                        <asp:Label ID="parentStyle" runat="server" Text='<%#Eval("styleName") %>'></asp:Label>
                                        <asp:HiddenField ID="hfstyleid" runat="server" Value='<%#Eval("ID")%>' />
                                        <asp:HiddenField ID="hfparentid" runat="server" Value='<%#Eval("parentID")%>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="topStyle" runat="server" Text='<%#Eval("styleName") %>'></asp:Label>
                                    </td>
                                    <td>
                                        <%#Eval("Gender") %>
                                    </td>
                                    <td>
                                        <span style='color: <%#bool.Parse(Eval("active").ToString())?"":"red"%>'>
                                            <%#Eval("active")%></span>
                                    </td>
                                    <td>
                                        <asp:ImageButton ID="imgDelete" runat="server" ImageUrl="/images/grv_delete.gif" CommandArgument='<%#Eval("ID") %>'
                                         OnClientClick="return confirm('Delete this style and all the child style?')"  onclick="imgDelete_Click"/>
                                    </td>
                                    <td>
                                        <%#Eval("createDate") %>
                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                        
                        <tr class="netpager">
                            <td colspan="9">
                               <webdiyer:AspNetPager ID="AspNetPager1" runat="server" FirstPageText="First" LastPageText="Last"
                                    NextPageText="Next" PageIndexBoxType="DropDownList" PrevPageText="Prev" ShowBoxThreshold="15"
                                    ShowCustomInfoSection="Left" ShowMoreButtons="False" SubmitButtonText="Go" TextAfterPageIndexBox=""
                                    TextBeforePageIndexBox="Goto" CustomInfoClass="pageinfo" CustomInfoHTML="Current Page : %CurrentPageIndex%    Total Page: %PageCount%"
                                    CustomInfoSectionWidth="30%" CustomInfoTextAlign="Left" OnPageChanging="AspNetPager1_PageChanging"
                                    PageSize="11">
                                </webdiyer:AspNetPager>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr class="data_lightcolor">
                <td>
                    &nbsp;
                </td>
                <td align="right">
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
